* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #d62c2c 0%, #b71c1c 100%);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.logo {
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.logo p {
    font-size: 16px;
    opacity: 0.9;
}

.card-selection {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.card-option {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.card-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-option h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.card-option p {
    font-size: 14px;
    opacity: 0.8;
}

.card-option-img {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.draw-page {
    display: none;
    width: 100%;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.card-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 250px;
}

.card-column h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #ffeb3b;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.draw-area {
    position: relative;
    width: 100%;
    height: 250px;
    perspective: 1000px;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.card-back {
    background: #f5f5f5;
}

.card-front {
    background: white;
    transform: rotateY(180deg);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.draw-btn {
    background: #ffeb3b;
    color: #d62c2c;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-width: 150px;
}

.draw-btn:hover {
    background: #ffd600;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.history-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-width: 150px;
}

.history-btn:hover {
    background: #45a049;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.history-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.card-counter {
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.8;
}

@media (max-width: 600px) {
    .cards-container {
        flex-direction: column;
        align-items: center;
    }
    
    .card-column {
        margin-bottom: 20px;
    }
    
    .draw-area {
        height: 280px;
    }
    
    .button-group {
        flex-direction: column;
        align-items: center;
    }
    
    .draw-btn, .history-btn {
        width: 100%;
        max-width: 250px;
    }
}